package com.boss.example.service.impl;

import com.boss.example.entity.dto.RolesDTO;
import com.boss.example.service.RolesService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class RolesServiceImpl implements RolesService {

    @Resource
    private RolesService rolesService;

    @Override
    public RolesDTO insertRole(RolesDTO rolesDTO) {
        return rolesService.insertRole(rolesDTO);
    }

    @Override
    public RolesDTO insertRoleMenu(RolesDTO rolesDTO, List<Integer> menuIdList) {
        return rolesService.insertRoleMenu(rolesDTO,menuIdList);
    }

    @Override
    public int deleteRole(RolesDTO rolesDTO) {
        return rolesService.deleteRole(rolesDTO);
    }

    @Override
    public int updateRolesName(RolesDTO rolesDTO) {
        return rolesService.updateRolesName(rolesDTO);
    }

    @Override
    public List<RolesDTO> getUserRoles(Integer userId) {
        return rolesService.getUserRoles(userId);
    }

    @Override
    public List<RolesDTO> getAllRoles() {
        return rolesService.getAllRoles();
    }

}
